import request from '@/utils/request'

export function getLIstWithAttr(id) {
  return request({
    url: `/api/goods/attrgroup/with/attr/${id}`,
    method: 'get'
  })
}

export function list(query, id) {
  return request({
    url: `/api/goods/attrgroup/list/${id}`,
    method: 'get',
    params: query
  })
}

export function info(id) {
  return request({
    url: `/api/goods/attrgroup/info/${id}`,
    method: 'get',
    param: id
  })
}

export function add(attrgroup) {
  return request({
    url: '/api/goods/attrgroup/save',
    method: 'post',
    data: attrgroup
  })
}

export function delMultiple(ids) {
  return request({
    url: '/api/goods/attrgroup/delete',
    method: 'post',
    data: ids
  })
}

export function update(attrgroup) {
  return request({
    url: '/api/goods/attrgroup/update',
    method: 'post',
    data: attrgroup
  })
}
